/*
 * This program finds all prime numbers from 2 to 100.
 * Written by John Johann Kim
 * on Mon Jan  6 12:49:09 PST 2014
 *
 * Update #1: Made it look like table
 * on Mon Jan  6 13:03:20 PST 2014
 * 
 */
class PrimeNum {
    public static void main(String args[]) {
        int i, j; 
        int counter = 0;

        System.out.println("--------------");
        System.out.println("Prime Numbers!");
        System.out.println("--------------");
        System.out.println("This table has the prime numbers from 2-100.");

        for(i = 2; i <= 100; i++) {
            for(j = 1; j <= 10; j++) {
                if(i / j == i && i == 2 | i % 2 != 0) {  // Leaves prime numbers
                    System.out.print(i + "\t");
            
                    counter++;

                   if(counter == 5) {  
                       System.out.println();
                       counter = 0;
                   }
                }
           }
        }
    }
}

